﻿<Window x:Class="BigNote.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:BigNote.Controls"
        xmlns:BigNote="clr-namespace:BigNote" WindowState="Maximized" AllowsTransparency="True" Topmost="True" Background="Transparent" WindowStyle="None" ShowInTaskbar="False" Icon="Resources\hat.ico">
    <Window.Resources>
        <SolidColorBrush x:Key="caret" Color="#33666666" />
        <BigNote:SolidColorBrushConverter x:Key="cc" />
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="320" />
        </Grid.ColumnDefinitions>    
            
        <Controls:AnimatingViewBox Margin="10" Grid.ColumnSpan="2">
            <TextBox x:Name="mainTextBox" SelectionBrush="{StaticResource caret}" CaretBrush="{StaticResource caret}"  FontSize="60" Background="Transparent" BorderThickness="0" AcceptsReturn="True">
                <TextBox.Effect>
                    <DropShadowEffect Color="White" BlurRadius="2" Direction="0" ShadowDepth="0" />
                </TextBox.Effect>
            </TextBox>
        </Controls:AnimatingViewBox>

        <Expander Grid.Column="1" x:Name="settingsExpander" Margin="5">
            <Expander.Header>
                <Image Source="Resources\128x128.png" Width="128" Height="128" HorizontalAlignment="Right" Opacity="0.3">
                    <Image.Triggers>
                        <EventTrigger RoutedEvent="MouseEnter">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation To="1" Duration="0:0:0.2" Storyboard.TargetProperty="Opacity" />
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="MouseLeave">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation To="0.3" Duration="0:0:0.2" Storyboard.TargetProperty="Opacity" />
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </Image.Triggers>
                </Image>
            </Expander.Header>
            <Expander.Content>
                <Border Background="White" BorderBrush="#CC222222" BorderThickness="2" CornerRadius="5" VerticalAlignment="Top" Margin="5" Padding="8">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>


                        <TextBlock Text="BigNote Settings" FontWeight="Bold" Grid.ColumnSpan="2" />
                        
                        <TextBlock Text="Font" Margin="3" Grid.Row="1" Grid.Column="0" />
                        <TextBox Text="{Binding ElementName=mainTextBox, Path=FontFamily}" Margin="3" Grid.Row="1" Grid.Column="1" />

                        <TextBlock Text="Color" Margin="3" Grid.Row="2" Grid.Column="0" />
                        <TextBox Text="{Binding ElementName=mainTextBox, Path=Foreground, Converter={StaticResource cc}}" Margin="3" Grid.Row="2" Grid.Column="1" />

                        <TextBlock Text="top-hat icon courtesy of http://lukataylo.deviantart.com" Margin="3" TextWrapping="Wrap" Grid.Row="3" Grid.ColumnSpan="2" />
                    </Grid>
                </Border>
            </Expander.Content>
        </Expander>
        
    </Grid>

</Window>
